package messages;

/**
 * This Message is used to indicate that clients are disconnecting.
 * 
 * @author Ian
 */
public class DeregistrationMessage extends BaseMessage {

    /**
     * Creates the message from the passed byte array
     * 
     * @param data
     */
    public DeregistrationMessage(byte[] data)
    {
        super(data);
    }
    
    /**
     * Creates a default Deregistration Message
     */
    public DeregistrationMessage()
    {
        super(null);
        //NOOP
    }

    @Override
    /**
     * returns the byte array version of this message
     */
    public byte[] toByteArray()
    {
        return defaultByteArray();
    }
    
    @Override
    /**
     * returns the size of the message
     */
    public int getMessageSize()
    {
        return 1;
    }

    @Override
    /**
     * returns the type of the message
     */
    public MessageType getMessageType()
    {
        return MessageType.DeregistrationMessage;
    }

}
